As methods for compressing and/or expanding image data constituted by a still image, there are widely known JPEG (Joint Photographic Expert Group) standards standardized according to CCITT (International Telegraph and Telephone Consultative Committee) and ISO (International Standards Organization). In the JPEG standards, an image data compressing method performed by dividing a frame image into a plurality of blocks in such a way that 8×8 pixels constitute one block, and transforming a spatial coordinate into a frequency coordinate, and an image data expanding method thereof are defined.
A data compressor according to the JPEG standards (hereinafter call “JPEG compressor”) divides input image data into many blocks, and performs DCT (Discrete Cosine Transform) processing and quantization processing on each block. In this quantization processing, a value obtained by multiplying data specified for each DCT coefficient by a quantization table by a quantization factor Q is used as a quantization step width. The DCT coefficient obtained by the DCT processing is quantized by the quantization step width, thereby irreversibly reducing a data amount. Thereafter, entropy coding using a run-length processing, a differential processing, a Huffman coding processing or the like is performed, thereby generating compressed image data. This coding is a processing for irreversibly reducing the data amount.
On the other hand, a data expander according to the JPEG standards (hereinafter call “JPEG expander”) performs opposite processings to those performed by the JPEG compressor to restore compressed image data to original image data. Namely, input compressed image data is decoded and dequantized using the same quantization table and the same quantization factor Q as those used in the data compression. Thereafter, an inverse DCT processing unit performs an inverse DCT transform to combine the divided blocks, thereby restoring the compressed image data to the original image data.
To improve a data compression rate of the JPEG compressor, it is necessary to change the quantization table or the quantization factor Q so as to make the quantization step width larger. However, if a large data amount is reduced in the quantization processing, which is an irreversible processing, a quality of the restored image data is greatly degraded. In addition, this quality degradation occurs throughout the image. Due to this, even if an important region and an unimportant region are present in the image, the image quality is disadvantageously, uniformly degraded in the both regions.
To solve this problem, there has been proposed a compression processing method for making a quality of an image after restoration different among regions of the image (see, for example, Patent Document 1). The Patent Document 1 discloses a data compression processor that includes a mask circuit that masks a DCT coefficient before a quantization processing. This data compression processor makes a mask employed in the mask circuit different among the regions, thereby coding an image in an important region at a high image quality and coding the image in an unimportant region at a low image quality.
However, this data compression processor needs to perform a mask processing halfway along DCT processing and quantization processing those are performed sequentially. Due to this, a general-purpose JPEG compression processor such as a JPEG chipset can not be employed as this data compression processor and the data compression processor is disadvantageously made expensive. Furthermore, the mask processing is a processing performed in each block, so that there is a limit to a data amount that can be reduced.
Patent Document 1: Japanese Unexamined Patent Publication No. 1994-054310